package com.hotelvip.service.batch.impl;



import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hotelvip.dao.VipCardItemMapper;
import com.hotelvip.entity.VipCardItem;
import com.hotelvip.service.batch.VipCardItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VipCardItemServiceImpl extends ServiceImpl<VipCardItemMapper, VipCardItem> implements VipCardItemService {
    @Autowired
    private VipCardItemMapper vipCardItemMapper;
    @Override
    public int deleteByUserId(Long id) {
        UpdateWrapper<VipCardItem> vipCardItemUpdateWrapper = new UpdateWrapper<>();
        vipCardItemUpdateWrapper.lambda().eq(VipCardItem::getVId, id);
        return vipCardItemMapper.delete(vipCardItemUpdateWrapper);
    }
}


